//
//  FFDefine.h
//  FFUtil
//
//  Created by nono on 16/6/22.
//  Copyright © 2016年 nono. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FFRoute.h"
#import "FFCommonUtil.h"

#import "UIColor+FFExpansion.h"
#import "FFImageView.h"
#import "FFProgressHUD.h"



// RGB颜色
#define FFColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define FFColorAlpha(r, g, b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]

//颜色和透明度设置
#define FFSameRGB(x) FFColor(x, x, x)
//随机色
#define FFRandomColor [UIColor colorWithRed:(arc4random_uniform(254) / 255.0) green:(arc4random_uniform(254) / 255.0) blue:(arc4random_uniform(254) / 255.0) alpha:1.0]
//    设置颜色 END

#define FFIsPushVC(className,propertyDict,isPush,isAnim) [[FFRoute share]goToControllerIsPush:isPush anim:isAnim ClassName:(className) From:self PropertyDic:propertyDict]

// pushVC
#define FFPush(className,propertyDict) FFIsPushVC(className,propertyDict,YES,YES)

// PresentVC
#define FFPresent(className,propertyDict,isAnim) FFIsPushVC(className,propertyDict,NO,isAnim)

// Pop
#define FFPop(controller,isAnim) [[FFRoute share]goBackFromController:controller anim:isAnim]

//屏幕宽度
#define FFScreenWidth [UIScreen mainScreen].bounds.size.width
//屏幕高度
#define FFScreenHeight [UIScreen mainScreen].bounds.size.height

// 计算运行时间
#define TICK   CFAbsoluteTime start = CFAbsoluteTimeGetCurrent()
#define TOCK   NSLog(@"Time: %f", CFAbsoluteTimeGetCurrent() - start)

#pragma mark - 切换是否 debug 模式
#ifdef DEBUG

#define FFLog(FORMAT, ...) fprintf(stderr,"%s:\n[line %d]\n%s\n%s\n\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__,__func__ ,[[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);

#else

#define FFLog(...)

#endif

@interface FFDefine : NSObject



@end
